/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entities;

import java.io.Serializable;
import javax.ejb.Singleton;
import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
* @author Sostenes, Thiago, Felipe
 */
@Entity
@Table(name = "funcionario")
@DiscriminatorValue(value = "F")
@PrimaryKeyJoinColumn(name = "id_funcionario")
public class Funcionario extends Pessoa implements Serializable {

    private static final long serialVersionUID = 1L;
    @Column(name = "login", nullable = false)
    @NotNull(message="{funcionario.login.NotNull}")
    @Size(min=3, max=10, message="{funcionario.login.Size}")
    private String login;
    @Column(name = "senha", nullable = false)
    @NotNull(message="funcionario.senha.NotNull")
    @Size(min=3, max=15, message="{funcionario.senha.Size}")
    private String senha;
    @Column(name = "nivel_acesso", nullable = false)
    private int nivelAcesso;
    @Column(name = "status_login")
    private int statusLogin;

    public String getLogin() {
        return login;
    }

    public void setLogin(String login) {
        this.login = login;
    }

    public String getSenha() {
        return senha;
    }

    public void setSenha(String senha) {
        this.senha = senha;
    }

    public int getNivelAcesso() {
        return nivelAcesso;
    }

    public void setNivelAcesso(int nivelAcesso) {
        this.nivelAcesso = nivelAcesso;
    }

    public int getStatusLogin() {
        return statusLogin;
    }

    public void setStatusLogin(int statusLogin) {
        this.statusLogin = statusLogin;
    }
}
